package classInnerDemo;

public class Demo3 {
	public static void main(String[] args) {
		//当局部内部类使用外界传递的变量，该变量必须用final修饰
		final int num1 = 12;
		class Foo3{
			int num2 =15;
			public int add(){
				return num1+num2;
			}
		}
		Foo3 foo3 = new Foo3();
		System.out.println(foo3.add());
	}
}
